(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/main"], {
    "5a00": function (t, e, n) {
        "use strict";
        var o = n("8307"), a = n.n(o);
        a.a
    }, "6b38": function (t, e, n) {
        "use strict";
        (function (t, e) {
            n("77a0");
            var o = d(n("66fd")), a = d(n("866d")), r = d(n("858d")), i = d(n("0fd5")), u = d(n("c1f6")),
                s = d(n("26de")), c = d(n("317d"));

            function d(t) {
                return t && t.__esModule ? t : {default: t}
            }

            function l(t, e) {
                var n = Object.keys(t);
                if (Object.getOwnPropertySymbols) {
                    var o = Object.getOwnPropertySymbols(t);
                    e && (o = o.filter((function (e) {
                        return Object.getOwnPropertyDescriptor(t, e).enumerable
                    }))), n.push.apply(n, o)
                }
                return n
            }

            function f(t) {
                for (var e = 1; e < arguments.length; e++) {
                    var n = null != arguments[e] ? arguments[e] : {};
                    e % 2 ? l(Object(n), !0).forEach((function (e) {
                        p(t, e, n[e])
                    })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : l(Object(n)).forEach((function (e) {
                        Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e))
                    }))
                }
                return t
            }

            function p(t, e, n) {
                return e in t ? Object.defineProperty(t, e, {
                    value: n,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : t[e] = n, t
            }

            o.default.mixin(c.default), o.default.config.productionTip = !1, o.default.prototype.$api = i.default, o.default.prototype.$store = r.default, i.default.setConfig({
                baseUrl: s.default.appurl,
                debug: s.default.debug
            }), i.default.interceptor.request = function (e) {
                if (!e.header.token || !e.header.wanlshop) {
                    var n = t.getStorageSync("wanlshop:user");
                    n && (e.header.token = t.getStorageSync("wanlshop:user").token), e.header["Accept-Language"] = "zh-CN,zh;q=0.9"
                }
                return void 0 === e.toastError && (e.toastError = !0), e
            }, i.default.interceptor.response = function (t, e) {
                return 1 === t.code ? t.success = !0 : 401 === t.code && x("/pages/user/auth/auth"), s.default.debug && console.log(t), t
            }, i.default.interceptor.fail = function (t, e) {
                var n = "";
                return n = 200 === t.statusCode || 401 === t.statusCode || 403 === t.statusCode ? t.data.msg : 404 === t.statusCode ? "API接口不存在" : 500 === t.statusCode ? "API接口异常" : "服务器繁忙", "request:fail abort statusCode:-1" == t.errMsg ? s.default.debug && console.log(t) : e.toastError && g(n), t
            };
            var g = function (e) {
                var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1500,
                    o = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
                    a = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "none";
                !1 !== Boolean(e) && (t.showToast({
                    title: e,
                    duration: n,
                    mask: o,
                    icon: a
                }), r.default.state.user.shock && t.vibrateShort())
            }, h = function () {
                var t = getCurrentPages(), e = t[t.length - 2];
                return e.$vm
            }, v = function () {
                var e = t.getSystemInfoSync(), n = {
                    top: e.statusBarHeight,
                    height: e.statusBarHeight + t.upx2px(90),
                    screenHeight: e.screenHeight,
                    platform: e.platform,
                    model: e.model,
                    windowHeight: e.windowHeight,
                    windowBottom: e.windowBottom
                }, o = t.getMenuButtonBoundingClientRect();
                return n.height = o.bottom + o.top - e.statusBarHeight, s.default.debug && console.log(n), n
            }, m = function () {
                var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "",
                    n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                e && t.setNavigationBarTitle({title: e}), "{}" != JSON.stringify(n) && t.setNavigationBarColor(n)
            }, b = function (t) {
                return s.default.cdnurl + "/assets/addons/wanlshop/img" + t
            }, y = function (t, e) {
                return "thousand" == e && (t > 9999 ? t = (t / 1e4).toFixed(1) + "w" : t > 999 && (t = (t / 1e3).toFixed(1) + "k")), "hundred" == e && t > 99 && (t = "99+"), t
            }, w = function (t, e) {
                return u.default.bcadd(t, e)
            }, j = function (t, e) {
                return u.default.bcsub(t, e)
            }, k = function (t, e) {
                return u.default.bcmul(t, e)
            }, S = function (t, e) {
                return u.default.bcdiv(t, e)
            }, _ = function () {
                var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null,
                    e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "yyyy-mm-dd";
                t = parseInt(t), t || (t = Number(new Date)), 10 == t.toString().length && (t *= 1e3);
                var n, o = new Date(t), a = {
                    "y+": o.getFullYear().toString(),
                    "m+": (o.getMonth() + 1).toString(),
                    "d+": o.getDate().toString(),
                    "h+": o.getHours().toString(),
                    "M+": o.getMinutes().toString(),
                    "s+": o.getSeconds().toString()
                };
                for (var r in a) n = new RegExp("(" + r + ")").exec(e), n && (e = e.replace(n[1], 1 == n[1].length ? a[r] : a[r].padStart(n[1].length, "0")));
                return e
            }, M = function () {
                var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null,
                    e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "yyyy-mm-dd";
                null == t && (t = Number(new Date)), t = parseInt(t), 10 == t.toString().length && (t *= 1e3);
                var n = (new Date).getTime() - t;
                n = parseInt(n / 1e3);
                var o = "";
                switch (!0) {
                    case n < 300:
                        o = "刚刚";
                        break;
                    case n >= 300 && n < 3600:
                        o = parseInt(n / 60) + "分钟前";
                        break;
                    case n >= 3600 && n < 86400:
                        o = parseInt(n / 3600) + "小时前";
                        break;
                    case n >= 86400 && n < 2592e3:
                        o = parseInt(n / 86400) + "天前";
                        break;
                    default:
                        o = !1 === e ? n >= 2592e3 && n < 31536e3 ? parseInt(n / 2592e3) + "个月前" : parseInt(n / 31536e3) + "年前" : _(t, e)
                }
                return o
            }, O = function () {
                var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;
                null == t && (t = Number(new Date)), t = parseInt(t), 10 == t.toString().length && (t *= 1e3);
                var e = (new Date).getTime() - t;
                e = parseInt(e / 1e3);
                var n = "";
                switch (!0) {
                    case e < 86400:
                        n = _(t, "hh:MM");
                        break;
                    case e >= 86400 && e < 604800:
                        var o = new Date(t), a = ["日", "一", "二", "三", "四", "五", "六"];
                        switch ((new Date).getDate() - o.getDate()) {
                            case 1:
                                n = _(t, "昨天 hh:MM");
                                break;
                            case 2:
                                n = _(t, "前天 hh:MM");
                                break;
                            default:
                                n = "星期" + a[o.getDay()] + _(t, "hh:MM")
                        }
                        break;
                    case e >= 604800:
                        n = _(t, "mm-dd hh:MM");
                        break;
                    default:
                        n = _(t, "yyyy-mm-dd hh:MM")
                }
                return n
            }, D = function () {
                var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 32,
                    e = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1],
                    n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null,
                    o = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), a = [];
                if (n = n || o.length, t) for (var r = 0; r < t; r++) a[r] = o[0 | Math.random() * n]; else {
                    var i;
                    a[8] = a[13] = a[18] = a[23] = "-", a[14] = "4";
                    for (var u = 0; u < 36; u++) a[u] || (i = 0 | 16 * Math.random(), a[u] = o[19 == u ? 3 & i | 8 : i])
                }
                return e ? (a.shift(), "u" + a.join("")) : a.join("")
            }, C = function (t) {
                var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 120,
                    n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 120,
                    o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 2,
                    a = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : "",
                    r = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : "jpg",
                    i = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : "resize",
                    u = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : 3, c = "",
                    d = ["m_lfit", "m_mfit", "m_fill", "m_fixed"],
                    l = ["?x-oss-process=image", "auto-orient,1", "interlace,1", "format,jpg", "quality,q_90", "sharpen,50", "resize,m_fixed,w_120,h_120"];
                return "png" == r && (l[3] = ["format", "png"].join(",")), l[6] = 0 == e ? [i, d[o], "h_".concat(n * u)].join(",") : 0 == n ? [i, d[o], "w_".concat(e * u)].join(",") : [i, d[o], "w_".concat(e * u), "h_".concat(n * u)].join(","), t ? /^data:image\//.test(t) ? c = t : /^(http|https):\/\/.+/.test(t) ? (l.pop(), c = t + l.join("/")) : c = s.default.cdnurl + t + l.join("/") : "transparent" == a || (c = b("avatar" == a ? "/common/mine_def_touxiang_3x.png" : "/common/img_default3x.png")), c
            }, x = function (e) {
                var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "pop-in",
                    o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 300;
                t.navigateTo({
                    url: e, animationType: n, animationDuration: o, success: function (t) {
                        s.default.debug && console.log(t)
                    }, fail: function (t) {
                        s.default.debug && console.log(t)
                    }
                })
            }, P = function () {
                var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1;
                t.navigateBack({delta: e})
            }, I = function (t) {
                x(r.default.state.user.isLogin ? t : "/pages/user/auth/auth")
            }, B = function (e) {
                e = decodeURIComponent(e), "/pages/wanlshop/index" == e || "/pages/product/category/category" == e || "/pages/find/find" == e || "/pages/cart/cart" == e || "/pages/user/user" == e ? t.switchTab({url: e}) : x(e)
            }, T = function (t) {
                i.default.post({
                    url: "/wanlshop/chat/send", data: t, success: function (e) {
                        u.default.setChat(t, "send")
                    }
                })
            }, H = function (e) {
                t.makePhoneCall({phoneNumber: e})
            }, $ = function () {
                return ""
            }, N = function (t) {
                return s.default[t]
            };
            o.default.prototype.$wanlshop = {
                msg: g,
                prePage: h,
                wanlsys: v,
                title: m,
                appstc: b,
                toFormat: y,
                timeToDate: M,
                timeToChat: O,
                timeFormat: _,
                guid: D,
                oss: C,
                to: x,
                on: B,
                auth: I,
                back: P,
                maks: $,
                send: T,
                phone: H,
                config: N,
                bcadd: w,
                bcsub: j,
                bcmul: k,
                bcdiv: S
            }, o.default.prototype.onGoods = function (t) {
                x("/pages/product/goods?id=".concat(t))
            }, o.default.prototype.onlike = function (t) {
                x("/pages/find/details/details?id=".concat(t))
            }, o.default.prototype.onShop = function (t) {
                var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
                x("/pages/shop/shop?id=".concat(t, "&type=").concat(e))
            }, o.default.prototype.orderDetails = function (t) {
                x("/pages/user/order/details?id=".concat(t))
            }, o.default.prototype.onLogistics = function (t) {
                x("/pages/user/order/logistics?id=".concat(t))
            }, o.default.prototype.toChat = function (t) {
                wx.makePhoneCall({
                    phoneNumber: '0373-3333008',
                })
            }, o.default.prototype.onDetails = function (t, e) {
                x("/pages/article/details?id=".concat(t, "&title=").concat(e))
            }, o.default.prototype.onAdvert = function (t) {
                t.url && !/^(http|https):\/\/.+/.test(t.url) ? B(t.url) : x("/pages/article/advert?id=".concat(t.id))
            }, o.default.prototype.onLive = function (t) {
                I("/pages/find/details/live?id=".concat(t))
            }, o.default.prototype.onFind = function (t) {
                "live" == t.type ? this.onLive(t.live_id) : x("/pages/find/details/details?id=".concat(t.id))
            }, a.default.mpType = "app";
            var E = new o.default(f({store: r.default}, a.default));
            e(E).$mount()
        }).call(this, n("543d")["default"], n("543d")["createApp"])
    }, 8307: function (t, e, n) {
    }, "866d": function (t, e, n) {
        "use strict";
        n.r(e);
        var o = n("89e2");
        for (var a in o) "default" !== a && function (t) {
            n.d(e, t, (function () {
                return o[t]
            }))
        }(a);
        n("5a00");
        var r, i, u, s, c = n("f0c5"), d = Object(c["a"])(o["default"], r, i, !1, null, null, null, !1, u, s);
        e["default"] = d.exports
    }, "89e2": function (t, e, n) {
        "use strict";
        n.r(e);
        var o = n("9b00"), a = n.n(o);
        for (var r in o) "default" !== r && function (t) {
            n.d(e, t, (function () {
                return o[t]
            }))
        }(r);
        e["default"] = a.a
    }, "9b00": function (t, e, n) {
        "use strict";
        Object.defineProperty(e, "__esModule", {value: !0}), e.default = void 0;
        o(n("66fd"));

        function o(t) {
            return t && t.__esModule ? t : {default: t}
        }

        var a = {
            onLaunch: function () {
                this.$store.dispatch("common/init"), this.$store.dispatch("cart/get"), this.$store.dispatch("statistics/get")
            }, onShow: function () {
                this.$store.dispatch("chat/start")
            }, onHide: function () {
                this.$store.dispatch("chat/close")
            }
        };
        e.default = a
    }
}, [["6b38", "common/runtime", "common/vendor"]]]);
